package Day3;

import java.util.Scanner;

public class TextAccount {
    public static void main(String[] args) {
        Account p = new Account();
        p.name = "admin1";
        p.num = "111111";
        Scanner input = new Scanner(System.in);
        System.out.println("请输入用户名：");
        String user = input.next();
        System.out.println("请输入密码：");
        String mima = input.next();
        if (user.equals(p.name) && mima.equals(p.num)){
            System.out.println("请输入新密码：");
            p.num = input.next();
            System.out.println("修改密码成功，新密码为："+p.num);
            p.Show();
        }else {
            System.out.println("用户名或密码不匹配！您没有权限更新管理员信息");
        }
    }
}
